/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upc.fulbitofacil.dao;

import edu.upc.fulbitofacil.entity.*;
import java.util.*;

/**
 *
 * @author usuario
 */
public class ComentarDAO {

    BaseDAO base;

    public ComentarDAO(){
    }

    public Integer insertar(Comentar comentar) throws FulbitoFacilException {
        String insert = "insert into ZALQCANCH(FECREG,NROITEM ,IDLOCAL,IDCAN ,BOXTEX ,CALIF1 ,CALIF2 ,CALIF3 ,CALIF4 ,CALIF5) "
                        + "values (sysdate,?,?,?,?,?,?,?,?,?)";

        List list = new ArrayList();

        //list.add(comentar.getFECREG());
        list.add(comentar.getNROITEM());
        list.add(comentar.getIDLOCAL());
        list.add(comentar.getIDCAN());
        list.add(comentar.getBOXTEX());
        list.add(comentar.getCALIF1());
        list.add(comentar.getCALIF2());
        list.add(comentar.getCALIF3());
        list.add(comentar.getCALIF4());
        list.add(comentar.getCALIF5());
        //list.add(alquiler.getTOTALQU());

        base = new BaseDAO();
        return base.insert(insert, list);
    }
}
